/**
 * 生成token的秘钥
 */


const secretExpiresIn = {
  secret: 'fjero-_cm-cfd_54_c7cd--',
  expiresIn: '10h'
}

// 解析token
const expressjwt = require('express-jwt')
const parseToken = expressjwt({ secret: secretExpiresIn.secret, algorithms: ['HS256'] }).unless({ path: [/^\/user\//] })

module.exports = { 
  secretExpiresIn,
  parseToken 
}